package controller

import (
	"Shopping/logic"
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
)

// ProductHandler 获取商品列表
func ProductHandler(c *gin.Context) {
	list, err := logic.GetProductList()
	if err != nil {
		zap.L().Error("logic.GetProductList failed", zap.Error(err))
		ResponseError(c, CodeServerBusy)
		return
	}
	ResponseSuccess(c, list)
}
